﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Facebook Pixel Code -->
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '869153776616895');
  fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
  src="https://www.facebook.com/tr?id=869153776616895&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="yes" name="apple-touch-fullscreen" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="320" name="MobileOptimized" />
    <meta content="telephone=no" name="format-detection" />

    
    <link href="../Scripts/Mall/toast.css" rel="stylesheet" />
    <link href="../Scripts/Mall/css/animate.css" rel="stylesheet" />
    <link href="../Style/base.css" rel="stylesheet" />
    <link href="../Style/detail.css" rel="stylesheet" />
    <link href="../Style/iconfont.css" rel="stylesheet" />
    <link href="../Style/mui.min.css" rel="stylesheet" />
    <link href="../Style/skin.css" rel="stylesheet" />
    <link href="Css/MallMainIndex.css" rel="stylesheet" />
    <linkrel="shortcut icon" href="favicon.ico">
    <linkrel="Bookmark" href="favicon.ico">

    <title></title>
   
</head>
<body style="margin: 0 auto;">

    
    <div class="mui-content">
        <div class="maining mainimg" style="width: 100%;">
            
        </div>

        <div class="detail-context">
            <div class="dc-price">
                <span class="yuan acticePrice">NT$1199</span>
                <span class="o-price oldPrice">NT$2356</span>
            </div>
            <div>
                <span class="flag">免運費</span>
                <span class="flag">貨到付款</span>
            </div>
        </div>

        <div class="clear"></div>
        <div class="detail-7day">
            <span class="detail-7day-icon">7天無理由退換貨</span>
            <span class="timeWrap" style="">距結束
                        <span id="timer"><span id="h" class="colon">8</span><span>时</span><span id="m" class="colon">2</span><span>分<span id="s" class="colon">5</span><span>秒</span></span></span>
            </span>
        </div>

        <div class="detail-number">
            <span style="display: block; float: left">已搶購 1912 件</span>
            <span style="width: 120px; height: 5px; border: 1px solid #f00; display: block; float: left; margin: 7px">
                <span style="width: 117px; height: 4px; background: #f00; display: block;"></span>
            </span>
            <span>98%</span>
        </div>

        <div class="clear"></div>
        <div class="detail-profile">
            大馬代購 爆款Ultra Boost鞋，價格優惠！錯過要後悔一整年！
        </div>

        <ul class="detail-bars">
            <li><span href="#detial-context" class="scrollBar" scroll-y="0">商品介紹</span></li>
            <li><span href="#detial-parameter" class="scrollBar" scroll-y="50">商品參數</span></li>
            <li class="pingjia"><span href="#detial-appraise" class="scrollBar" scroll-y="-60">評價 (1654)</span></li>
        </ul>
        <div class="clear"></div>

        <div class="detail-block _img_" id="detial-context">
            <div class="detail_con">
                <p class="detailimg">
                    
                </p>
            </div>
        </div>

        <div class="clear"></div>
        <div class="detail-block" id="detial-appraise" style="position: relative;">
            <h4>最新評價</h4>
            <div id="mq" data-fn="commentScroll">
                
                    
                
                
            </div>
            <div class="mskeLayBg" style="height: 4053px;"></div>
            <div class="mskelayBox">
                <div class="mske_html">
                </div>
                <img class="mskeClaose" src="MallImg/close.png" width="27" height="27">
            </div>
            <div class="go-appraise">
                <a id="btnAppr">我要評價</a>
            </div>
        </div>
        <div class="clear"></div>
        <div style="padding: 0px; padding-bottom: 50px">
            <div style="width: 100%; background: white">
                <img src="MallImg/footer.jpg" width="100%">
            </div>
            <div style="padding: 5px 20px; text-align: left; background-color: #eee; color: #7B7A7A">
                <p style="margin-bottom: 0;"><font color="#F8770E"><b>溫馨提示：</b></font>收到商品後有任何疑問請聯繫在線客服或發郵件至<a href="mailto:trouble@gomoretw.com" style="color: #F8770E"><!--email_off-->trouble@gomoretw.com<!--/email_off--></a> 。同時請告知您的姓名及聯繫方式及訂單編號，我們能快速的給您及時處理唷，祝您購物愉快！</p>
            </div>
        </div>

        <div class="mui-bar">
            <span class="query" id="btnQuery">
                <img src="MallImg/filter-2.png">
                <a>
                    <span style="line-height: 14px">訂單<br>
                        查詢</span>
                </a>
            </span>
            <span class="purchase" data-id="1050" id="btnPay">
                <a>
                    <img src="MallImg/buy2.png">
                    <span>立即購買</span>
                </a>
            </span>
            <span class="service" id="btnOnline" data-id="1050">
                <img src="MallImg/service.png">
                <a>
                    <span style="line-height: 14px">在線<br>
                        客服</span>
                </a>
            </span>
        </div>

        <div style="display: none; position: fixed; z-index: 199998; width: 100%; text-align: center; height: 100%; background: rgba(0, 0, 0, 0.58); padding: 0px; bottom: 0px; margin: 0px; max-width: 640px;" id="imgbg">
            <img style="width: 80%; margin: 0 auto; vertical-align: middle" id="bigimg">
        </div>
        <div style="position: fixed; z-index: 99998; width: 100%; height: 100%; background: black; padding: 0px; bottom: 0px; margin: 0px; opacity: 0.7; max-width: 640px; display: none;" id="apprbg"></div>

        <div style="width: 100%; max-width: 640px; clear: both; position: relative;">
            <div style="position: fixed; z-index: 99999; width: 90%; left: 0px; right: 0px; margin: 0px auto; height: 500px; padding: 0px 5%; top: 16%; max-width: 640px; display: none;" id="apprDialog">
                <form action="http://victory.aalmost.com/index.php" method="post" id="apprForm">
                    <div class="buyinfo_table">
                        <div class="closeBtn">
                            <img src="MallImg/close.png">
                        </div>
                        <div class="buyinfo_hd">在線留言</div>
                        <hr class="seperator">
                        <div class="buyinfo_table_box">
                            <table>
                                <tbody>
                                    <tr>
                                        <td class="table_td"><span class="require">*</span>姓名:</td>
                                        <td class="table_cell">
                                            <input type="text" placeholder="請輸入姓名" class="mui-input-clear input01" name="name" maxlength="10"></td>
                                    </tr>

                                    <tr>
                                        <td class="table_td"><span class="require">*</span>手機:</td>
                                        <td class="table_cell">
                                            <input type="text" placeholder="請輸入手機號碼" class="input01" name="phone" maxlength="20"></td>

                                    </tr>
                                    <tr>
                                        <td class="table_td">滿意度:</td>
                                        <td class="table_cell">
                                            <div class="star" id="stars">
                                                <span class="star-item" data-id="1">★</span>
                                                <span class="star-item" data-id="2">★</span>
                                                <span class="star-item" data-id="3">☆</span>
                                                <span class="star-item" data-id="4">☆</span>
                                                <span class="star-item" data-id="5">☆</span>
                                            </div>
                                            <input type="hidden" name="level" value="2">
                                        </td>
                                    </tr>

                                    <tr>
                                        <td class="table_td">留言:</td>
                                        <td class="table_cell">
                                            <textarea placeholder="請輸入您的留言內容" name="content" class="textarea_style"></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tc">
                                            <input id="btnAppraise" type="button" name="Submit" class="input_btn01" value="提交評價" style="color: white">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
    <script src="../Scripts/Mall/jquery.min.js"></script>
    <script src="commonComent.js"></script>
    <script src="../Scripts/Mall/mui.min.js"></script>
    
    <script src="../Scripts/Mall/toast.js"></script>

    <script type="text/javascript">
    var url = location.search;
    var Request = new Object();
    Request = GetRequest(url);
    $.ajax({
        url: "goodsinfo.php",  
        type: "POST",
        dataType: "json",
        error: function(){  
            alert('Error goodsinfo.php');  
        },  
        success: function(res){//如果调用php成功 
            var data;   
            $.each(res,function(index,value){
                if (value.id==Request.id){
                    data = value;
                    detailhtml="";
                    let detailImg = JSON.parse(data.detailImg);
                    $.each(detailImg,function(index,value){
                        detailhtml+='<img width="100%" class="lazy" data-original="'+value+'" src="'+value+'" style="display: inline;">';
                    });
                    $('.detail-profile').html(data.name);
                    $('title').html(data.name);
                    $(".detailimg").html(detailhtml);
                    $(".mainimg").html('<img src="'+data.mainImg+'" style="width: 100%;" />');
                    
                    if(data.symbol){
                        $(".acticePrice").html(data.symbol+data.nowPrice);
                    }else {
                        $(".acticePrice").html(data.nowPrice);
                    }
                    if(data.symbol){
                        $(".oldPrice").html(data.symbol+data.originPrice);
                    }else {
                        $(".oldPrice").html(data.originPrice);
                    }
                    
                    
                }
            });
            
        }
    });
//从链接中获取参数
function GetRequest(url) {
      var theRequest = new Object();
      if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
          theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
        }
      }
      return theRequest;
}

        
    </script>

  
    <script>
        var interval = 1000;
        function ShowCountDown(year, month, day, divname) {
            var cc = document.getElementById(divname);
            var now = new Date();
            year = now.getYear();
            month = now.getMonth();
            day = now.getDay();
            var endDate = new Date(year, month, day, now.getHours() + 9);
            var leftTime = endDate.getTime() - now.getTime();
            var leftsecond = parseInt(leftTime / 1000);
            var day1 = Math.floor(leftsecond / (60 * 60 * 24));
            var hour = Math.floor((leftsecond - day1 * 24 * 60 * 60) / 3600);
            var minute = Math.floor((leftsecond - day1 * 24 * 60 * 60 - hour * 3600) / 60);
            var second = Math.floor(leftsecond - day1 * 24 * 60 * 60 - hour * 3600 - minute * 60);

            cc.innerHTML = '<span id="h" class="colon">' + hour + "</span>" + '<span>' + "时" + '</span><span id="m" class="colon">' + minute + '</span><span>' + "分" + '<span id="s" class="colon">' + second + '</span><span>' + "秒</span>";
        }
        ShowCountDown(2018, 4, 20, 'timer');
        window.setInterval(function () {
            ShowCountDown(2018, 4, 20, 'timer');
        }, interval);
    </script>

    <script type="text/javascript" charset="utf-8">
    function GetRequest(url) {
      var theRequest = new Object();
      if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
          theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
        }
      }
      return theRequest;
}
        $(function () {
            var url = location.search;
            var Request = new Object();
            Request = GetRequest(url);
            //点击购买
            $("#btnPay").click(function () {
                fbq('track', 'AddToCart');
                window.location.href = 'DropOrder.html?id='+Request.id+'';
            });

            //点击客服
            $("#btnOnline").bind("click", function () {
                //P8.startGroupChat(342605);
                //window.location.href = "http://api.pop800.com/chat/342605";
                window.open("http://api1.pop800.com/chat/371346", "newWindow", "menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1");
            });

            //点击查询
            $("#btnQuery").bind("click", function () {
                window.location.href = 'OrderQuery.html?id='+Request.id+'';
            });

            $("#btnAppr").bind("click", function () {
                $("#apprbg").show();
                $("#apprDialog").show();
            });

            $(".closeBtn").bind("click", function () {
                $("#apprbg").hide();
                $("#apprDialog").hide();
            });

            $(".star-item").bind("click", function () {
                var level = $(this).attr("data-id");
                $("input[name='level']").val(level);
                $(this).text("★");
                $(this).nextAll().each(function (index, element) {
                    $(this).text("☆");
                });

                $(this).prevAll().each(function (index, element) {
                    $(this).text("★");
                });
            });

            $("#btnAppraise").bind("click", function () {
                if ($("input[name='name']").val() == '') {
                    toast('請填寫您的姓名');
                    return false;
                }
                if ($("input[name='phone']").val() == '') {
                    toast('請填寫您的手機');
                    return false;
                }

                var twphone = /^([-_－—\s\(]?)([\(]?)((((0?)|((00)?))(((\s){0,2})|([-_－—\s]?)))|(([\)]?)[+]?))(886)?([\)]?)([-_－—\s]?)([\(]?)[0]?[1-9]{1}([-_－—\s\)]?)[1-9]{2}[-_－—]?[0-9]{3}[-_－—]?[0-9]{3}$/;
                if (!twphone.test($("input[name='phone']").val())) {
                    toast("手機號碼無效");
                    return;
                }
                toast("提交成功");
                $("#apprbg").hide();
                $("#apprDialog").hide(500);
            });

            function toast(title) {
                $('body').toast({
                    position: 'fixed',
                    content: title,
                    duration: 3000,
                    isCenter: false,
                    background: 'gray',
                    animateIn: 'bounceIn-hastrans',
                    animateOut: 'bounceOut-hastrans',
                });
            }


            $(".mqc img").bind("click", function () {
                $("#bigimg").attr("src", $(this).attr("src"));
                $("#imgbg").show();
            });

            $("#imgbg").bind("click", function () {
                $("#imgbg").hide();
            });

            $(".scrollBar").bind("click", function () {
                var y = $(this).attr("scroll-y");
                $('html, body').animate({
                    scrollTop: $($(this).attr("href")).offset().top - y
                }, 1000);
            });

            var nav = $(".detail-bars"); //得到导航对象
            var win = $(window); //得到窗口对象
            var sc = $(document);//得到document文档对象。

            win.scroll(function () {
                if (sc.scrollTop() >= $(".detail-profile").offset().top + 45) {
                    nav.addClass("fixed");
                } else {
                    nav.removeClass("fixed");
                }
            });


            var boxer = jQuery('[data-fn=commentScroll]');
            var list = jQuery(boxer).children().eq(0);
            var clone = list.clone();
            var clone2 = list.clone();
            $(boxer).append(clone).append(clone2);
            var speed = 35;

            function Marquee() {
                if (list.height() < boxer.height()) {
                    if (boxer.scrollTop() >= list.height()) {
                        boxer.scrollTop(0);
                    } else {
                        boxer.scrollTop(boxer.scrollTop() + 1);
                    }
                } else {
                    if (boxer.scrollTop() - list.height() >= 4) {
                        boxer.scrollTop(0);
                    } else {
                        boxer.scrollTop(boxer.scrollTop() + 1);
                    }
                }
            }

            setInterval(Marquee, speed);


            jQuery(".edui-upload-video").each(function (index, element) {
                if (jQuery("#videoPoster").length > 0) {
                    jQuery(this).attr("poster", jQuery("#videoPoster").attr("href"));
                    jQuery(this).height(jQuery(this).width() / 640 * 360);
                    //alert(jQuery("#videoPoster").height());
                    //jQuery(this).height(jQuery("#videoPoster").height());
                    jQuery("#videoPoster").remove();
                }
            });

            jQuery(function () {
                if (jQuery(".edui-upload-video").length > 0) {
                    jQuery(".edui-upload-video").attr("poster", "/public/image/videoPlay.jpg");
                    jQuery(".edui-upload-video").click(function () {
                        jQuery(this).get(0).play();
                    });
                }
            });

            var gallery = mui('.mui-slider');
            gallery.slider({
                interval: 3000//自动轮播周期，若为0则不自动播放，默认为0；
            });
        });
    </script>
</body>
</html>
